// createRouter: 创建路由实例对象  new VueRouter()
// createWebHistory: 函数 创建history模式的路由  （hash / history）

import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import BigScreen from '../views/BigScreen/big-index.vue'

const router = createRouter({
  // 指定当前的路由模式为history模式的路由
  history: createWebHistory(),
  // 定义路由对象
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      redirect: '/bigscreen'
    },
    {
      path: '/bigscreen',
      name: 'bigScreen',
      component: BigScreen
    }
  ]
})

export default router
